<?php
include_once '../util/db/Conn.php';
include_once '../util/ArrayList.php';
include_once '../util/db/model/Product.php';
include_once '../util/db/model/ProdSubType.php';
include_once '../util/db/service/ProductDBUtil.php';
include_once '../util/db/service/ProdSubTypeDBUtil.php';
header ( "Content-Type:text/html; charset=utf-8" );
$productDBUtil = new ProductDBUtil ();
//echo $productDBUtil->queryAll()->get(0)->getP_id();
@$pt_id = $_POST ['pt_id'];
@$type = $_POST['type'];
if ($pt_id && $type=='action1') {
		?>
	<select name=sort>
			<?php
		$prodSubTypeDBUtil = new ProdSubTypeDBUtil ();
		$array = $prodSubTypeDBUtil->queryByType ( $pt_id );
		for($i = 0; $i < $array->size (); $i ++) {
			$prodSubType = $array->get ( $i );
			echo "<option value='".$prodSubType->getPst_id()."'>".$prodSubType->getSub_type()."</option>  ";
			?>
			
					 	<?php
		}
		?>
		</select>
	<?php
	}

?>

